<!--#include virtual="/dzps/p1.asp"-->
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>权限管理</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
  <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
</head>
<body>
  <div class="layui-fluid">
    <div class="layui-card">
      <div class="layui-form layui-card-header layuiadmin-card-header-auto">
        <div class="layui-form-item">
          <div class="layui-inline">
            <label class="layui-form-label">项目名</label>
            <div class="layui-input-block">
              <input type="text" id="username"  name="username" placeholder="请输入" autocomplete="off" class="layui-input">
            </div>
          </div>

          <div class="layui-inline">
            <button class="layui-btn layuiadmin-btn-useradmin" lay-submit lay-filter="user-front-search">
              <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
            </button>
          </div>
        </div>
      </div>	
      <div class="layui-form layui-card-header layuiadmin-card-header-auto">
        <div class="layui-form-item">
<%
	qx_list2(val("usernameqx"))
	
Function qx_list2(usernameqx)
	dim sql,rs1,cnt
	vas "usernameqx",usernameqx
	sql="select * from [prj] where (1=1) and prn like '%" &  easp.var("dbName1") & "%' order by id desc"
	if val("username")<>"" then
		vas "likeKey" ,"%{=username}%"
		sql=replace(sql,"1=1","prn like {likeKey}")
	end if	
	Set rs1 = Easp.Db.Sel(sql)
	Do While Not rs1.EOF		
		vas "id",rs1("id")
		sql="select count(id) from t_qx where username={usernameqx} and t_db4qx_id={id}"
		cnt = Easp.Db.Sel(sql)(0)
		if cnt = 0 then
			cb rs1("ID"),rs1("prn"),""
		else
			cb rs1("ID"),rs1("prn"),"checked"
		end if
		rs1.MoveNext
	Loop
End Function	
%>
		</div>
<div class="layui-form-item">
          <div class="layui-input-block">
            <button class="layui-btn" lay-submit="" lay-filter="qx_save">立即提交</button>
          </div>
</div>		
      </div>
    </div>
  </div>

  <script src="../../../layuiadmin/layui/layui.js"></script>  
  <script>
  layui.config({
    base: '../../../layuiadmin/' //静态资源所在路径
  }).extend({
    index: 'lib/index' //主入口模块
  }).use(['index', 'useradmin', 'table'], function(){
    var $ = layui.$
    ,form = layui.form
    ,admin = layui.admin	
    ,table = layui.table;
    var $ = layui.$;
    form.render();
  form.on('submit(user-front-search)', function(data){
		location.href = 'qx.asp?usernameqx=<%=val("usernameqx")%>'+'&username='+$("#username").val(); //跳转到登入页
  });

  form.on('submit(qx_save)', function(data){
		var field = data.field;
		$.post('../../../../p1.asp?now=' + new Date().getTime(), {
			data:field,
			"usernameqx":"<%echo val("usernameqx")%>",
			action: "qx_save2"
		},
		function(data) {
			if (data == '1') {
				layer.msg("成功!!");
			} else {
				layer.msg("失败！！ "+data);
			}
		});    
    return false;
  });	
	});	
    

  </script>
</body>
</html>